Stored Procedures [dbo].[BAEOrderCategoryLoadParent]
Properties
PropertyValue
ANSI Nulls OnYes
Quoted Identifier OnYes
Parameters
NameData TypeMax Length (Bytes)
@OrderCategoryIDint4
SQL Script
create procedure [dbo].[BAEOrderCategoryLoadParent] @OrderCategoryID as
int
AS
    SELECT * FROM OrderCategory WHERE OrderCategoryID =
        (SELECT OrderCategoryParentID FROM OrderCategory AS oc JOIN OrderCategoryParentLookup AS ocpl ON
        oc.OrderCategoryID = ocpl.OrderCategoryID WHERE oc.OrderCategoryID = @OrderCategoryID);

GO
Uses